package com.chorye.datasource.service;

import com.chorye.datasource.entity.StudentThird;
import com.chorye.datasource.dao.slave.StudentThirdMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Chorye
 * @since 2018-12-12
 */
@Service
public class StudentThirdService {

    @Autowired
    private StudentThirdMapper studentThirdMapper;

    /**
     * 通过学生id查询学生信息
     *
     * @param stuId 学生ID
     * @return 学生实体
     */
    public StudentThird getStudentThirdById(Integer stuId) {
        return studentThirdMapper.getStudentThirdById(stuId);
    }

    /**
     * 插入学生信息
     *
     * @param studentThird 学生实体信息
     * @return 插入成功的数量
     */
    public int insert(StudentThird studentThird) {
        return studentThirdMapper.insert(studentThird);
    }
}
